﻿using EMoney.IStock.Client.Models.Cpyx;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace EMoney.IStock.Client.DataAccess.Cpyx
{
    /// <summary>
    /// 我的记录数据访问类
    /// </summary>
    public class UserResultDal
    {
        public List<UserResult> GetUserResult(int userID,int pageNum, int beginNum, int type, out string msg)
        {
            msg = string.Empty;

            SQLTools tools = new SQLTools();

            tools.AddSqlParameter("pUserID", System.Data.SqlDbType.Int, userID);
            tools.AddSqlParameter("pPageNum", System.Data.SqlDbType.Int, pageNum);
            tools.AddSqlParameter("pBeginNum", System.Data.SqlDbType.Int, beginNum);
            tools.AddSqlParameter("pType", System.Data.SqlDbType.Int, type);
            tools.AddSqlParameter("opMsg", SqlDbType.VarChar, 20, msg, ParameterDirection.Output);

            return SQLHelper.GetProcedureDataByColumnsLst<UserResult>(ConnectionManager.Emfstock, "sp_web_qry_user_game_result", tools.GetSqlParameters());
        }
    }
}
